<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件</title>
    <script src="../vue.global.js"></script>
    <style>
        .red{
            color:red;
        }
        .font-big{
            font-size: 50px;
        }
    </style>
</head>
<body>

<div id="App">

    <button-counter></button-counter>
    <button-counter></button-counter>
    <button-counter></button-counter>

</div>


<script>


    const vm = Vue.createApp({});

    vm.component("button-counter",{

        data(){
            return{
                counter:100,
            }
        },
        template:`
        counter:{{counter}}
        <button v-on:click="counter++">counter++</button>
        <br/>
        `
    });

    vm.mount("#App");


</script>
</body>
</html>